<template>
  <div>
    <nuxt v-if="routerShow"/>
    <backtop></backtop>
  </div>
</template>

<script>
import backtop from '~/components/backtop'

export default {
  components: {
    backtop
  },
  head() {
    return {}
  },
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      routerShow: true
    }
  },
  beforeMount() {
    let homeHref = sessionStorage.getItem('homeHref') || location.href
    sessionStorage.setItem('homeHref', homeHref)
  },
  methods: {
    reload() {
      this.routerShow = false
      this.$nextTick(() => {
        this.routerShow = true
      })
    }
  }
}
</script>

<style  lang="stylus" rel="stylesheet/stylus">
</style>
